package com.sdu.cloudservice.dao;

import com.sdu.cloudservice.entity.AdminEntity;
import com.sdu.cloudservice.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * Created by lenovo on 2019/7/4.
 * @author ZMX
 */
@Mapper
@Repository
public interface AdminDao {
    @Select("SELECT * FROM admin WHERE username=#{username}")
    AdminEntity findAdminByUsername(@Param("username") String username);
    @Update("UPDATE admin SET password=#{password} WHERE username=#{username}")
    int update(@Param("username")String username, @Param("password")String password);
}
